<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        body {
            /* 这个透视里面值直接写 没有括号 值得大小不固定 自己调试个喜欢的 */
            perspective: 500px;
        }
        .box {
            position: relative;
             width: 300px;
             height: 300px;
             margin: 100px auto;
             
             transform-style: preserve-3d;
             transition: all .5s;
        }
        .box:hover {
            transform: rotateY(180deg);
        }
        .box .frst,.back{
            position: absolute;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            border-radius: 50%;
            font-size: 18px;
            text-align: center;
            line-height: 300px;
            color:red;
        }
        .frst {
            background-color: skyblue;
            z-index: 1;
          
          
            
        }
        .back {
            background-color: pink;
            transform: rotateY(180deg);
            
        }
    </style>
</head>
<body>
    <div class="box">
        <div class="frst">此时努力不后悔</div>
        <div class="back">他日回忆不惋惜</div>
    </div>
</body>
</html>